﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace MailProcessing
{
    public class MailAccountInfo
    {
        public int InPort { get; set; }
        public bool IncomingIsSSL { get; set; }
        public string IncomingServerName { get; set; }
        public string EmailAddress { get; set; }
        public string Password { get; set; }

        public static MailAccountInfo FillMailAccountInfo()
        {
            MailAccountInfo mailAccountInfo =  new MailAccountInfo();
            mailAccountInfo.EmailAddress = ConfigurationManager.AppSettings["EmailAddress"];// "myvan1991@hotmail.com";
            mailAccountInfo.IncomingIsSSL = bool.Parse(ConfigurationManager.AppSettings["EmailIncomingIsSSL"]);// true;
            mailAccountInfo.IncomingServerName = ConfigurationManager.AppSettings["EmailIncomingServerName"];// "pop3.live.com";
            mailAccountInfo.InPort = int.Parse(ConfigurationManager.AppSettings["EmailInPort"]);// 995;
            mailAccountInfo.Password = ConfigurationManager.AppSettings["EmailPassword"];// "1qazxsw2";
            return mailAccountInfo;
        }
    }
}
